
<!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ -->
<script src="http://code.angularjs.org/1.0.1/angular-1.0.1.min.js"></script>
<script
	src="http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js"></script>

<script type="text/javascript">
	var myApp = angular.module('myApp', []);

	myApp.directive('uiDate', function() {
		return {
			require : '?ngModel',
			link : function($scope, element, attrs, controller) {
				element.mask("99/99/9999", {
					completed : function() {
						controller.$setViewValue(Date.parse(this.val(),
								"dd/MM/yyyy"));
						$scope.$apply();
					}
				});
			}
		};
	});

	function Patient() {
		this.nom;
		this.prenom;
		this.dateNaissance;
	}

	function PatientController($scope) {
		$scope.patient = new Patient();
		$scope.label = "Resultat : ";
	}
</script>


<div ng-app="myApp">
	<div ng-controller="PatientController">
		
		<br> <label>Date de naissance: </label> <input id="date"
			ng-model="patient.dateNaissance" ui-date>
		<hr>
		<h1>{{label}} {{patient.prenom}} {{patient.nom}}
			{{patient.dateNaissance | date: 'dd/MM/yyyy'}}</h1>
	</div>
</div>